pull: Support specifying exact commit to pull via branch@commit
authorColin Walters <walters@verbum.org>
Thu, 11 Feb 2016 18:28:03 +0000 (13:28 -0500)
committerColin Walters <walters@verbum.org>
Sun, 14 Feb 2016 15:12:26 +0000 (10:12 -0500)
commit42c60effbe5037d674ce4b84979ccaf91edfad48
tree87d66e1b3dc538f76819b41ad0cfa7c8d03de956
parent355f8438ef4fe2720d25e8241aa76797b7029522
pull: Support specifying exact commit to pull via branch@commit

I don't know why we didn't do this a long time ago.  This extends the
pull API to allow grabbing a specific commit, and will set the branch
to it.  There's some support for this in the deploy engine, but there
are a lot of reasons to support it for raw pulls (such as subset
mirroring cases).

In fact I'm thinking we should also have the override-version logic
here too.

NOTE: One thing I debated here is inventing a new syntax on the
command line.  Git doesn't seem to have this functionality (probably
because it'd be rarely used). The '@' character at least doesn't
conflict with anything.

Anyways, I wanted this for some other test cases.  Without this,
writing tests that go between different commits is more awkward as one
must generate the content in one repo, then pull downstream, then
generate more content, then pull again.  But now I can just keep track
of commit IDs and do exactly what I want without synchronizing the
tests.
man/ostree-pull.xml
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo.c
src/ostree/ot-builtin-pull.c
tests/pull-test.sh